home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13483 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 69 6e 74 65 72 |Path: ne|ws.inter|
|00000010| 70 61 74 68 2e 6e 65 74 | 21 75 73 65 6e 65 74 0a |path.net|!usenet.|
|00000020| 46 72 6f 6d 3a 20 22 52 | 69 63 68 61 72 64 20 46 |From: "R|ichard F|
|00000030| 2e 20 41 6c 62 75 72 79 | 22 20 3c 72 69 63 68 61 |. Albury|" <richa|
|00000040| 72 64 2e 61 6c 62 75 72 | 79 40 76 69 72 74 75 73 |rd.albur|y@virtus|
|00000050| 2e 63 6f 6d 3e 0a 4e 65 | 77 73 67 72 6f 75 70 73 |.com>.Ne|wsgroups|
|00000060| 3a 20 63 6f 6d 70 2e 6c | 61 6e 67 2e 63 2b 2b 0a |: comp.l|ang.c++.|
|00000070| 53 75 62 6a 65 63 74 3a | 20 52 65 3a 20 57 69 6e |Subject:| Re: Win|
|00000080| 64 6f 77 73 20 33 2e 78 | 20 4d 65 6d 6f 72 79 20 |dows 3.x| Memory |
|00000090| 4f 62 6a 65 63 74 73 0a | 44 61 74 65 3a 20 4d 6f |Objects.|Date: Mo|
|000000a0| 6e 2c 20 32 35 20 4d 61 | 72 20 31 39 39 36 20 31 |n, 25 Ma|r 1996 1|
|000000b0| 37 3a 31 33 3a 31 30 20 | 2d 30 35 30 30 0a 4f 72 |7:13:10 |-0500.Or|
|000000c0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 56 69 72 74 |ganizati|on: Virt|
|000000d0| 75 73 20 43 6f 72 70 6f | 72 61 74 69 6f 6e 0a 4d |us Corpo|ration.M|
|000000e0| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 33 31 35 37 |essage-I|D: <3157|
|000000f0| 31 41 37 36 2e 33 44 30 | 36 40 76 69 72 74 75 73 |1A76.3D0|6@virtus|
|00000100| 2e 63 6f 6d 3e 0a 52 65 | 66 65 72 65 6e 63 65 73 |.com>.Re|ferences|
|00000110| 3a 20 3c 33 31 35 34 39 | 43 32 39 2e 34 46 32 43 |: <31549|C29.4F2C|
|00000120| 40 67 6c 6f 62 61 6c 6e | 65 74 2e 63 6f 2e 75 6b |@globaln|et.co.uk|
|00000130| 3e 0a 4e 4e 54 50 2d 50 | 6f 73 74 69 6e 67 2d 48 |>.NNTP-P|osting-H|
|00000140| 6f 73 74 3a 20 61 6c 62 | 75 72 79 2d 77 69 6e 2e |ost: alb|ury-win.|
|00000150| 76 69 72 74 75 73 2e 63 | 6f 6d 0a 4d 69 6d 65 2d |virtus.c|om.Mime-|
|00000160| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 43 6f 6e |Version:| 1.0.Con|
|00000170| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|00000180| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|00000190| 73 2d 61 73 63 69 69 0a | 43 6f 6e 74 65 6e 74 2d |s-ascii.|Content-|
|000001a0| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|000001b0| 67 3a 20 37 62 69 74 0a | 58 2d 4d 61 69 6c 65 72 |g: 7bit.|X-Mailer|
|000001c0| 3a 20 4d 6f 7a 69 6c 6c | 61 20 32 2e 30 20 28 57 |: Mozill|a 2.0 (W|
|000001d0| 69 6e 4e 54 3b 20 49 29 | 0a 54 6f 3a 20 44 61 76 |inNT; I)|.To: Dav|
|000001e0| 69 64 20 57 72 69 67 6c | 65 79 20 3c 64 77 72 69 |id Wrigl|ey <dwri|
|000001f0| 67 6c 65 79 40 67 6c 6f | 62 61 6c 6e 65 74 2e 63 |gley@glo|balnet.c|
|00000200| 6f 2e 75 6b 3e 0a 0a 44 | 61 76 69 64 20 57 72 69 |o.uk>..D|avid Wri|
|00000210| 67 6c 65 79 20 77 72 6f | 74 65 3a 0a 3e 20 43 61 |gley wro|te:.> Ca|
|00000220| 6e 20 61 6e 79 6f 6e 65 | 20 65 6e 6c 69 67 68 74 |n anyone| enlight|
|00000230| 65 6e 20 6d 65 20 61 73 | 20 74 6f 20 74 68 65 20 |en me as| to the |
|00000240| 64 69 66 66 65 72 65 6e | 63 65 73 20 69 6e 20 6d |differen|ces in m|
|00000250| 65 6d 6f 72 79 20 6f 62 | 6a 65 63 74 73 20 74 68 |emory ob|jects th|
|00000260| 61 74 0a 3e 20 77 6f 75 | 6c 64 20 62 65 20 63 72 |at.> wou|ld be cr|
|00000270| 65 61 74 65 64 20 75 73 | 69 6e 67 20 27 6e 65 77 |eated us|ing 'new|
|00000280| 27 20 61 6e 64 20 73 61 | 79 2c 20 66 6f 72 20 65 |' and sa|y, for e|
|00000290| 78 61 6d 70 6c 65 2c 20 | 27 47 6c 6f 62 61 6c 41 |xample, |'GlobalA|
|000002a0| 6c 6c 6f 63 27 20 69 6e | 20 61 0a 3e 20 57 69 6e |lloc' in| a.> Win|
|000002b0| 64 6f 77 73 20 33 2e 78 | 20 70 72 6f 67 72 61 6d |dows 3.x| program|
|000002c0| 2e 0a 3e 20 0a 3e 20 49 | 20 75 6e 64 65 72 73 74 |..> .> I| underst|
|000002d0| 61 6e 64 20 77 68 61 74 | 20 69 20 62 75 79 20 75 |and what| i buy u|
|000002e0| 73 69 6e 67 20 74 68 65 | 20 53 44 4b 20 66 75 6e |sing the| SDK fun|
|000002f0| 63 74 69 6f 6e 73 2c 20 | 62 75 74 20 64 6f 6e 27 |ctions, |but don'|
|00000300| 74 20 75 6e 64 65 72 73 | 74 61 6e 64 0a 3e 20 77 |t unders|tand.> w|
|00000310| 68 61 74 20 49 20 77 6f | 75 6c 64 20 67 65 74 20 |hat I wo|uld get |
|00000320| 77 69 74 68 20 27 6e 65 | 77 27 2e 0a 3e 20 0a 3e |with 'ne|w'..> .>|
|00000330| 20 55 70 20 74 6f 20 6e | 6f 77 2c 20 49 20 68 61 | Up to n|ow, I ha|
|00000340| 76 65 20 6f 76 65 72 6c | 6f 61 64 65 64 20 27 6e |ve overl|oaded 'n|
|00000350| 65 77 27 20 61 6e 64 20 | 6d 61 70 70 65 64 20 6f |ew' and |mapped o|
|00000360| 6e 74 6f 20 61 6e 20 53 | 44 4b 20 6d 65 6d 6f 72 |nto an S|DK memor|
|00000370| 79 0a 3e 20 61 6c 6c 6f | 63 61 74 69 6f 6e 20 66 |y.> allo|cation f|
|00000380| 75 6e 63 74 69 6f 6e 2c | 20 77 69 74 68 20 61 20 |unction,| with a |
|00000390| 66 69 78 65 64 20 61 6c | 6c 6f 63 61 74 69 6f 6e |fixed al|location|
|000003a0| 20 66 6c 61 67 20 28 65 | 67 20 47 48 4e 44 29 0a | flag (e|g GHND).|
|000003b0| 0a 52 65 63 61 6c 6c 20 | 74 68 61 74 20 75 6e 64 |.Recall |that und|
|000003c0| 65 72 20 57 69 6e 64 6f | 77 73 20 33 2e 78 2c 20 |er Windo|ws 3.x, |
|000003d0| 74 68 65 72 65 20 69 73 | 20 61 20 6c 69 6d 69 74 |there is| a limit|
|000003e0| 20 28 3c 20 38 31 39 32 | 2c 20 49 20 62 65 6c 69 | (< 8192|, I beli|
|000003f0| 65 76 65 29 20 74 6f 20 | 74 68 65 20 6e 75 6d 62 |eve) to |the numb|
|00000400| 65 72 20 6f 66 20 67 6c | 6f 62 61 6c 20 6d 65 6d |er of gl|obal mem|
|00000410| 6f 72 79 20 62 6c 6f 63 | 6b 73 20 79 6f 75 20 0a |ory bloc|ks you .|
|00000420| 63 61 6e 20 61 6c 6c 6f | 63 61 74 65 20 28 62 65 |can allo|cate (be|
|00000430| 63 61 75 73 65 20 68 61 | 6e 64 6c 65 73 20 61 72 |cause ha|ndles ar|
|00000440| 65 20 61 63 74 75 61 6c | 6c 79 20 73 65 6c 65 63 |e actual|ly selec|
|00000450| 74 6f 72 73 20 61 6e 64 | 20 61 6c 6c 20 74 68 61 |tors and| all tha|
|00000460| 74 20 67 72 6f 74 65 73 | 71 75 65 20 49 6e 74 65 |t grotes|que Inte|
|00000470| 6c 20 4d 4d 55 20 73 74 | 75 66 66 29 2e 20 20 49 |l MMU st|uff). I|
|00000480| 6e 20 74 68 69 73 20 0a | 73 63 65 6e 61 72 69 6f |n this .|scenario|
|00000490| 2c 20 69 74 27 73 20 6d | 6f 72 65 20 65 66 66 69 |, it's m|ore effi|
|000004a0| 63 69 65 6e 74 20 74 6f | 20 22 73 75 62 61 6c 6c |cient to| "suball|
|000004b0| 6f 63 61 74 65 22 20 6d | 65 6d 6f 72 79 2c 20 69 |ocate" m|emory, i|
|000004c0| 2e 65 2e 2c 20 77 72 69 | 74 65 20 79 6f 75 72 20 |.e., wri|te your |
|000004d0| 6f 77 6e 20 6c 69 74 74 | 6c 65 20 6d 65 6d 6f 72 |own litt|le memor|
|000004e0| 79 20 6d 61 6e 61 67 65 | 72 20 74 68 61 74 20 0a |y manage|r that .|
|000004f0| 73 75 62 61 6c 6c 6f 63 | 61 74 65 73 20 6f 75 74 |suballoc|ates out|
|00000500| 20 6f 66 20 6f 6e 65 20 | 67 6c 6f 62 61 6c 20 6d | of one |global m|
|00000510| 65 6d 6f 72 79 20 62 6c | 6f 63 6b 2e 20 20 53 6f |emory bl|ock. So|
|00000520| 2c 20 77 68 65 6e 20 79 | 6f 75 20 63 61 6c 6c 20 |, when y|ou call |
|00000530| 61 20 74 79 70 69 63 61 | 6c 20 43 20 6f 72 20 43 |a typica|l C or C|
|00000540| 2b 2b 20 72 75 6e 74 69 | 6d 65 20 6d 65 6d 6f 72 |++ runti|me memor|
|00000550| 79 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 20 0a 66 75 |y alloca|tion .fu|
|00000560| 6e 63 74 69 6f 6e 20 73 | 75 63 68 20 61 73 20 6d |nction s|uch as m|
|00000570| 61 6c 6c 6f 63 28 29 20 | 6f 66 20 6e 65 77 28 29 |alloc() |of new()|
|00000580| 2c 20 79 6f 75 27 72 65 | 20 61 63 74 75 61 6c 6c |, you're| actuall|
|00000590| 79 20 63 61 6c 6c 69 6e | 67 20 73 75 62 61 6c 6c |y callin|g suball|
|000005a0| 6f 63 61 74 69 6f 6e 20 | 63 6f 64 65 20 77 72 69 |ocation |code wri|
|000005b0| 74 74 65 6e 20 62 79 20 | 74 68 65 20 63 6f 6d 70 |tten by |the comp|
|000005c0| 69 6c 65 72 20 76 65 6e | 64 6f 72 2e 20 20 0a 54 |iler ven|dor. .T|
|000005d0| 68 65 20 64 6f 77 6e 20 | 73 69 64 65 20 69 73 20 |he down |side is |
|000005e0| 74 68 61 74 20 77 68 65 | 6e 20 79 6f 75 20 73 75 |that whe|n you su|
|000005f0| 62 61 6c 6c 6f 63 61 74 | 65 2c 20 69 74 27 73 20 |ballocat|e, it's |
|00000600| 72 65 61 6c 20 65 61 73 | 79 20 74 6f 20 74 72 61 |real eas|y to tra|
|00000610| 73 68 20 6d 65 6d 6f 72 | 79 20 77 69 74 68 6f 75 |sh memor|y withou|
|00000620| 74 20 76 69 6f 6c 61 74 | 69 6e 67 20 74 68 65 20 |t violat|ing the |
|00000630| 62 6f 75 6e 64 73 20 6f | 66 20 74 68 65 20 0a 67 |bounds o|f the .g|
|00000640| 6c 6f 62 61 6c 20 6d 65 | 6d 6f 72 79 20 62 6c 6f |lobal me|mory blo|
|00000650| 63 6b 20 79 6f 75 27 72 | 65 20 73 75 62 61 6c 6c |ck you'r|e suball|
|00000660| 6f 63 61 74 69 6e 67 20 | 6f 75 74 20 6f 66 2e 20 |ocating |out of. |
|00000670| 20 48 65 6e 63 65 20 74 | 68 65 20 6d 61 72 6b 65 | Hence t|he marke|
|00000680| 74 20 66 6f 72 20 74 68 | 69 72 64 2d 70 61 72 74 |t for th|ird-part|
|00000690| 79 20 6d 65 6d 6f 72 79 | 20 6d 61 6e 61 67 65 72 |y memory| manager|
|000006a0| 73 20 6c 69 6b 65 20 0a | 4d 65 6d 43 68 65 63 6b |s like .|MemCheck|
|000006b0| 20 61 6e 64 20 53 6d 61 | 72 74 48 65 61 70 2e 0a | and Sma|rtHeap..|
|000006c0| 0a 48 54 48 2c 0a 52 69 | 63 68 61 72 64 0a |.HTH,.Ri|chard. |
+--------+-------------------------+-------------------------+--------+--------+